<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    	<link rel="stylesheet" type="text/css" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css" media="all"
    />
    	<title>Requirements in Diagrams</title>
	</head>
	<body>
		<h1 id="Requirements_in_Diagrams">Requirements in Diagrams</h1>
		<h2 id="Layer_and_tools_in_diagram">Layer and tools in diagram</h2>
		<p>
			<img border="0" src="../../images/requirements_diagram_example.png"/>
		</p>
		<p>Requirements and their relations (from/to Capella elements and internal relations between Requirements) can be displayed
			in your diagrams. Requirements that are associated with the current diagram is displayed with a special icon on the top right corner as shown in the above image.</p>
		<p>For this, the Requirements layer must be activated (activated by default for new diagrams):

			<img border="0" src="../../images/requirements_layer.png"/>
		</p>
		<p>Once activated, a new segment <b>Requirements</b> appears in the palette tools:

			<br/>

			<img border="0" src="../../images/requirements_segment.png"/>
		</p>
		<p>In this <b>Requirements</b> segment, 5 new tools are available to manipulate the requirements on a diagram.</p>
		<ul>
			<li>
				<b> Requirements </b>
			</li>
		</ul>
		<dl>
			<dd>Allow to add or remove a requirement to/from a diagram. This tool does not modify the semantic element.</dd>
		</dl>
		<ul>
			<li>
				<b> Requirement Link </b>
			</li>
		</ul>
		<dl>
			<dd>Allow to allocate a requirement to a Capella element represented on the diagram by drawing an edge between them.</dd>
		</dl>
		<ul>
			<li>
				<b> All Linked Requirements: </b>
			</li>
		</ul>
		<dl>
			<dd>On a Capella element, show all of its linked Requirements, incoming and outgoing.</dd>
			<dd>On a Requirement, show all of its internal Requirements, incoming and outgoing.</dd>
			<dd>On the back of the diagram, show all linked Requirements of the diagram and also all linked Requirements of all graphical elements of the diagram, incoming and outgoing.</dd>
		</dl>
		<ul>
			<li>
				<b> Incoming Requirements: </b>
			</li>
		</ul>
		<dl>
			<dd>Display a wizard to select incoming Requirements to show or hide, from a Capella Element or another Requirement.</dd>
		</dl>
		<ul>
			<li>
				<b> Outgoing Requirements: </b>
			</li>
		</ul>
		<dl>
			<dd>Display a wizard to select outgoing Requirements to show or hide, to a Capella Element or another Requirement.</dd>
		</dl>
		<h2 id="Label_and_content_configuration">Label and content configuration</h2>
		<p>The label and content displayed for each requirement can be computed dynamically by evaluating two predefined AQL expressions.
			The two AQL expressions can be configured in the dedicated wizard dialog.</p>
		<p>
			<img border="0" src="../../images/requirements_configuration_wizard.png"/>
		</p>
		<p>The wizard can be activated by clicking on the root "System Engineering" of a Capella project which has been referenced by the Requirements Viewpoint.</p>
		<p>
			<img border="0" src="../../images/requirements_configuration_wizard_menu.png"/>
		</p>
		<p>By default, there are two predefined AQL expressions for both label and content of requirements. The displayed texts are truncated and followed by <b>"..."</b> if they are longer than the defined lengths.
			It is possible to change AQL expressions and the lengths to fulfill operational needs. However, if the AQL expression is invalid, in other words, could not be interpreted, the result will be displayed as <b>&lt;undefined&gt;</b>.</p>
		<p>
			<img border="0" src="../../images/requirements_diagram_example_special_case.png"/>
		</p>
		<p>The AQL expression is very flexible and easy to use for almost every operational need. For instance, the example below shows how we can display the content of each requirement by aggregating information from 4 properties in 4 bulleted lines:</p>
		<table class="wikitable">
			<tr>
				<td><code>aql:OrderedSet{self.ReqIFLongName, self.ReqIFName, self.ReqIFChapterName, self.ReqIFText}-&gt;select(s  | s != 'null' and s.size() &gt; 0).prefix('- ')-&gt;sep('\n')</code></td>
				<td>
					<img border="0" src="../../images/requirements_diagram_example_2.png"/>
				</td>
			</tr>
		</table>
		<p>
			<br/>
		</p>
		<table class="wikitable">
			<tr>
				<td>
					<img height="32" width="32" border="0" src="PLUGINS_ROOT/org.polarsys.capella.vp.requirements.doc/images/info.png"/>
				</td>
				<td>After each modification of the AQL expressions, each diagram needs to be refreshed manually by users so that new changes will be taken into account. It is possible to refresh all diagrams at one click by following the screenshot below.</td>
			</tr>
		</table>
		<p>
			<br/>
		</p>
		<p>
			<img border="0" src="../../images/RefreshAllDiagramsMenu.png"/>
		</p>
	</body>
</html>